/*
 * 设置背诵窗口布局
 */
package recitation;

import target.*;
import javax.swing.*;
import net.miginfocom.swing.MigLayout;

/**
 *
 * @author buer
 */
public class RecitationLayoutFactory {

    public RecitationLayoutFactory() {
        // 使用MigLayou布局管理器
        jp = new JPanel(new MigLayout());
        jp.setSize(600, 480);
    }

    public JPanel createLayout() {
        // 左边窗口，包含单词和tricks显示窗口
        JPanel jpLeft = new JPanel(new MigLayout("wrap"));
        jpLeft.add(Recitation.recitationControler.getjPanelWord());
        jpLeft.add(Recitation.recitationControler.getjPanelTricks());
        // 右边窗口，包含评级和操作窗口
        JPanel jpRight = new JPanel(new MigLayout("wrap"));
        jpRight.add(Recitation.recitationControler.getjPanelRating());
        jpRight.add(Recitation.recitationControler.getjPanelOperation());

        jp.add(jpLeft);
        //jp.add(jpRight, "wrap");
        jp.add(jpRight);
        // 下边的状态栏，显示一些统计信息
        //jp.add(Recitation.recitationControler.getjPanelStatus(), "dock south");
        
        return jp;
    }
    
    private JPanel jp;
}
